/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wrox.beginspring.pix.model;

import com.wrox.beginspring.pix.dao.PixUserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author nika
 */
public class Main {

    public static void main(String[] args) {
        
        PixUser pixUser = new PixUser();
        pixUser.setFirstName("AmitabhDao");
        
        ApplicationContext appContext = new ClassPathXmlApplicationContext(
                "META-INF/applicationContext.xml");
        
        PixUserDao pixUserDao = (PixUserDao) appContext.getBean("pixUserDao");
        pixUserDao.savePixUser(pixUser);
    }
}
